Push Notifications
PushNotifications attached business rule can be configured to send downstream messages when an activity processing is completed and before persisting data to DB. These messages are delivered to the downstream for the events defined in the DownstreamMessagePushDefinition rule. The rule can be overridden at Activity Plan, Activity Policy, Activity Client, Activity Company.
Note: The rule should not be listed in the TransactionBusinessRules packet, but will get processed after post assignment and data persist.
The PushNotifications ABR allows the user to define messages for "Successful Activity Processing or when the Activity Processing Fails (OnTransactionFailure)" and send the appropriate messages to the downstream. The rule can be configured to create a business error on activity, to rollback an activity in case of message push failure or to continue processing an activity.
PushNotifications uses custom-built expressions to construct the required messages. Message templates can be created using custom configuration. Parameters allows values from math or activity fields and feeds the values to JSTL elements.
Note: Math required for PushNotifications to construct JSTL messages should be defined in Transaction XML. Date generation and date format conversion can be done by configuring a MathVariable. Refer to the examples mentioned in the below sections.
Events
A user can configure a single message or multiple messages for each events and map each event to different downstream applications. When multiple messages are defined for an event, system validates a condition, and sends appropriate message to the downstream.
<PushNotifications> may include multiple <PushNotification> for each event, which can be triggered for a particular EVENTNAME that is defined as <Event> in DownstreamMessagePushDefinition rule.
Transactions
PushNotifications can be configured to push messages for all activity types of all entities such as Plan, Policy (Policy document, Policy financial etc.), Client, Company and Customer.
<OnPushFailure>: Defines an action that needs to be taken in case of Push failure. It can be configured to,
-
define an action to be taken in case of exceptions during message push such as, call to the external system fails or timeout. An activity can be rolled back in case of push failure.
-
display business errors and warnings in case of push failure.
-
generate errors and warnings for an activity, when <RollBack> is 'Yes' and <CreateBusinessError> is 'Yes' .
-
generate errors and warnings for an activity, when <RollBack> is 'No' and <CreateBusinessError> is 'Yes' .
<OnTransactionFailure>:Creates an error message or an indication that should be pushed to downstream when an activity processing fails.
-
If PushNotifications ABR has error configuration for OnTransactionFailure, then an error message is sent to downstream in case of activity failure. If PushNotification event doesn't have OnTransactionFailure message configured, no message is sent to downstream if activity fails.
-
Multiple OnTransactionFailure messages for each event can be defined in OnTransactionFailure message section of PushNotifications. Each event can have a single OnTransactionFailure message. OnTransactionFailure message is sent to all the events defined in PushNotifications.
Note: Configuring a message using <OnTransactioFailure> is optional.
Activity XML: Activity XML of PushNotifications captures the status and reason for failure of an activity processing.
Note: Below variables will get auto populated if configured as below in PushNotifications.
-
MESSAGEGUID will be autopopulated. JSTL variable for MESSAGEGUID is ${MESSAGEGUID}.
-
REVERSAL is auto populated based on the processing status of the activity. It's value is 'True' for Reversal processing and 'False' for forward processing.
-
JSTL variable for reversal is ${REVERSAL}
-
<ApplicationID> tag will print the literal value provided in the configuration.
-
EVENTDATETIME gets auto populated based on the time of processing the event. It is the timestamp at which the event is getting processed. JSTL variable for event datetime is ${EVENTDATETIME}
-
Two math variables needs to be defined at transaction xml one for Generate time format and other for date format conversion. And the EventDateTime will be printed in the same format if configured in PushNotifications.
Request and Response for PushNotifications
| Request format | Responses |
|---|---|
|
|
PushNotifications - JMS Elements and Attributes
| Element/Tag | Parent Element | Definition | Attribute | Element/Attribute Value and Description |
|---|---|---|---|---|
| <PushNotifications> | Opening tag of PushNotificationsBusiness rule. | |||
| <Templates> | <PushNotifications> | Parent tag for templates. | ||
| <Template> | <Templates> | Optional: Messages to be reused can be defined as template. | ||
| <Template> | ID | Name / id of the message | ||
| <JSTLMessage> | <Template> | Required: JSLT tags to create message. | ||
| <Parameters> | <JSTLMessage> | Parent tag for parameters | ||
| <Parameter> | <Parameters> | Required: Parameter mapped to math and passed to JSTL message element. | ||
| <Parameter> | NAME | Required: Name of the parameter. | ||
| <Parameter> | TYPE | Optional: Type is required for complex math types | ||
| <Parameter> | DATATYPE | Required: Value is the datatype of math variable. | ||
| <PushNotification> | <PushNotifications> | Required and repeatable: Contains all the events and their respective messages. | ||
| <PushNotification> | EVENT | Name of the event. | ||
| <Tests> | <PushNotification> | Parent tag for test | ||
| <Test> | <Tests> | Specifies a test expression. Expression is validated and if it is true the message under the test tag will be pushed. | ||
| <Test> | CONDITION | Expression for test condition. | ||
| <Message> | <PushNotification> | Required: Parent tag for the message. | ||
| <Message> | ID | Name of the message. | ||
| <Template> | <Message> | Optional: Reusable template can be combined with message to be sent downstream. | ||
| <JSTLMessage> | <Message> | Required: JSLT tags to create message. | ||
| <Parameters> | <JSTLMessage> | Contains parameters of JSTL message. | ||
| <Parameter> | <Parameters> | Required: Parameter mapped to math or activity field and passed to JSTL message element. | ||
| <Parameter> | NAME | Required: Name of the parameter. | ||
| <Parameter> | TYPE | Optional: Type is required for complex math types. | ||
| <Parameter> | DATATYPE | Required: Value is the datatype of math variable. | ||
| <OnTransactionFailure> | <PushNotification> |
Optional: Parent tag for transaction failure actions and messages. Indicates activity processing failure, and a message is sent to downstream when an activity processing fails. |
||
| <Message> | <OnTransactionFailure> | Optional: Parent tag for message on transaction failure. | ID | Required: Message ID |
| <JSTLMessage> | <Message> | Required: JSLT tags to create message | ||
| <Parameters> | <JSTLMessage> | Parent tag for parameters | ||
| <Parameter> | <Parameters> | Required: Parameter mapped to math and passed to JSTL message element. | ||
| <Parameter> | NAME | Required: Name of the parameter | ||
| <Parameter> | TYPE | Optional: Type is required for complex math types. | ||
| <Parameter> | DATATYPE | Required: Value is the datatype of math variable. | ||
| <OnPushFailure> | <PushNotifications> | Required: Parent tag for push failure actions | ||
| <RollBack> | <OnPushFailure> |
Required: Values are yes/No Yes: indicates a rollback is required No: indicates rollback is not needed |
||
| <CreateBusinessError> | <OnPushFailure> |
Required: Values are yes/No Yes: indicates a business error needs to be created on activity No: indicates business error is not needed |
<PushNotifications>
<Templates>
<Template ID="[name]">
<Parameters>
<Parameter NAME="[name]">[field | variable]</Parameter>
<Parameter>...</Parameter>
</Parameters>
<JSTLMessage>
<[parameter name]>[parameter attribute name | literal]</[parameter name]>
<[parameter name]>...</[parameter name]>
</JSTLMessage>
</Template>
<Template>
...
</Template>
</Templates>
<PushNotification EVENTNAME="[name]">
<Message ID="">
<Tests>
<Test>[condition]</Test>
<Test>...</Test>
</Tests>
<AsEventMessage xmlns="[name space]">
<JSTLTemplate>[id]</JSTLTemplate>
<JSTLTemplate>...</JSTLTemplate>
<JSTLMessage>
<Parameters>
<Parameter NAME="[name]" DATATYPE="[TEXT | INTEGER | DECIMAL | DATE | BOOLEAN | CURRENCY | BIGTEXT]" >[]</Parameter>
<Parameter>...</Parameter>
</Parameters>
<[parameter name]>[parameter attribute name | literal]</[parameter name]>
<[parameter name]>...</[parameter name]>
</JSTLMessage>
</AsEventMessage>
</Message>
<OnTransactionFailure>[failure message id]</OnTransactionFailure>
</PushNotification>
<PushNotification>...</PushNotification>
<OnTransactionFailure>
<Message ID="[failure message id]">
<AsEventMessage xmlns="[name space]">
<JSTLTemplate>[id]</JSTLTemplate>
<JSTLTemplate>...</JSTLTemplate>
<JSTLMessage>
<Parameters>
<Parameter NAME="[name]" DATATYPE="[TEXT | INTEGER | DECIMAL | DATE | BOOLEAN | CURRENCY | BIGTEXT]" >[]</Parameter>
<Parameter>...</Parameter>
</Parameters>
<[parameter name]>[parameter attribute name | literal]</[parameter name]>
<[parameter name]>...</[parameter name]>
</JSTLMessage>
</AsEventMessage>
</Message>
<Message>
...
</Message>
</OnTransactionFailure>
<OnPushFailure>
<RollbackTransaction>[Yes | No]</RollbackTransaction>
<CreateBusinessError>[Yes | No]</CreateBusinessError
</OnPushFailure>
</PushNotifications>
Example of PushNotifications, DownstreamMessagePushDefinition and Transaction:
<PushNotifications>
<Templates>
<Template ID="Header">
<JSTLMessage>
<Parameters>
<Parameter DATATYPE="FORMATDATE" NAME="ActivityEffectiveDate">ActivityEffectiveDate</Parameter>
<Parameter DATATYPE="Text" NAME="ActivityGUID">Activity:ActivityGUID</Parameter>
</Parameters>
<ActivityGUID>[ActivityGUID]</ActivityGUID>
<ActivityEffectiveDate>[ActivityEffectiveDate]</ActivityEffectiveDate>
<EventDateTime>[EVENTDATETIME]</EventDateTime>
</JSTLMessage>
</Template>
<Template ID="Header1">
<JSTLMessage>
<Parameters>
<Parameter DATATYPE="Date" NAME="EFFdate">Activity:EffectiveDate</Parameter>
</Parameters>
<EffectiveDate>[EFFdate]</EffectiveDate>
</JSTLMessage>
</Template>
</Templates>
<!-- Sample message tamplate -->
<PushNotification EVENTNAME="Billing">
<Message ID="BillingMsg1">
<Tests>
<Test>1=1</Test>
<Test>1=1</Test>
</Tests>
<AsEventMessage xmlns="http://xmlns.alamere.com/PAS/AsEventMessage">
<JSTLTemplate>Header</JSTLTemplate>
<JSTLTemplate>Header1</JSTLTemplate>
<JSTLMessage>
<Parameters>
<Parameter DATATYPE="TEXT" NAME="payerName">payerName</Parameter>
<Parameter DATATYPE="BOOLEAN" NAME="isReBill">isReBill</Parameter>
<Parameter DATATYPE="BIGTEXT" NAME="BigTextMV1">BigTextMV1</Parameter>
<Parameter DATATYPE="Date" NAME="RequiredMV">RequiredMV</Parameter>
</Parameters>
<Billing>
<Reversal>[REVERSAL]</Reversal>
<BigTextMV1>[BigTextMV1]</BigTextMV1>
<payerName>[payerName]</payerName>
<isReBill>[isReBill]</isReBill>
</Billing>
<Premium>
<Area>[BigTextMV1]</Area>
<Date>[RequiredMV]</Date>
</Premium>
</JSTLMessage>
</AsEventMessage>
</Message>
</PushNotification>
<OnPushFailure>
<RollbackTransaction>Yes</RollbackTransaction>
<CreateBusinessError>Yes</CreateBusinessError>
</OnPushFailure>
</PushNotifications>
Transaction:
<Transaction>
<EffectiveDate STATUS="Enabled" TYPE="SYSTEM"/>
<Fields>
<Field>
<Name>TextArea1</Name>
<Display>Text Area 1 Field</Display>
<DataType>TextArea</DataType>
</Field>
<Field>
<Name>GraceMoney</Name>
<Display>Grace Money Received</Display>
<DataType>Money</DataType>
<Currency>EUR,JPY,THB,TWD,USD</Currency>
<DefaultValue>0</DefaultValue>
</Field>
<Field>
<Name>SomeDate</Name>
<Display>some Date</Display>
<DataType>Date</DataType>
</Field>
<Field>
<Name>field2</Name>
<Display>GraceMoney Comment</Display>
<DataType>Text</DataType>
</Field>
<Field>
<Name>Test</Name>
<Display>GraceMoney Comment21</Display>
<DataType>Text</DataType>
</Field>
<Field>
<Name>PolicyCurrencySupportTest1</Name>
<Display>Bug Retest Currency21</Display>
<DataType>Money</DataType>
<DefaultValue>0</DefaultValue>
</Field>
<Field>
<Name>PaymentMode</Name>
<Display>PaymentMode</Display>
<DataType>Decimal</DataType>
<DefaultValue>1</DefaultValue>
</Field>
</Fields>
<Math>
<MathVariables>
<MathVariable VARIABLENAME="True" TYPE="VALUE" DATATYPE="TEXT">01</MathVariable>
<MathVariable VARIABLENAME="False" TYPE="VALUE" DATATYPE="TEXT">00</MathVariable>
<MathVariable VARIABLENAME="ActivityEffectiveDate" TYPE="DATE" DATATYPE="FORMATDATE" OPERATION="CONVERT" TOFORMAT="YYYY-'W'ww-u">Activity:EffectiveDate</MathVariable>
<MathVariable VARIABLENAME="EventDateTime" TYPE="DATE" DATATYPE="FORMATDATE" OPERATION="GENERATE" TOFORMAT="YYYY-'W'ww-u"/>
<MathVariable VARIABLENAME="RequiredMV" TYPE="FIELD" DATATYPE="DATE">Activity:EffectiveDate</MathVariable>
<MathVariable VARIABLENAME="ActivityEffDate" TYPE="FIELD" DATATYPE="DATE">Activity:EffectiveDate</MathVariable>
<MathVariable VARIABLENAME="PaidToDate" TYPE="FIELD" DATATYPE="DATE">Activity:EffectiveDate</MathVariable>
<MathVariable VARIABLENAME="BigTextMV1" TYPE="FIELD" DATATYPE="BIGTEXT">Activity:TextArea1</MathVariable>
<MathVariable VARIABLENAME="payerName" TYPE="VALUE" DATATYPE="TEXT">Chris Snow</MathVariable>
<MathVariable VARIABLENAME="isReBill" TYPE="VALUE" DATATYPE="BOOLEAN">false</MathVariable>
</MathVariables>
</Math>
</Transaction>
DownstreamMessagePushDefinition:
<DownstreamMessagePushDefinition>
<Event ENV="Production" EVENTMETHOD="JMS" EVENTNAME="Billing">
<JMSConfiguration>
<ProviderUrl>tcp://host:port</ProviderUrl>
<!--ProviderUrl>http://host:port/PASJava</ProviderUrl-->
<ConnectionFactory>ConnectionFactory</ConnectionFactory>
<DestinationName>dynamicQueues/DownstreamMessagePushQueue</DestinationName>
<MaxTimeOut>1000000</MaxTimeOut>
</JMSConfiguration>
<Security>
<UserName>admin</UserName>
<Password>6BWYeciXwE/8PJrnWQ7syQ==</Password>
</Security>
</Event>
</DownstreamMessagePushDefinition>
XML Example 2
<PushNotifications>
<Templates>
<Template id='Header'>
<Parameters>
<!-- MessageGuid and MessageDateTime will be auto generated -->
<Parameter NAME= EFFdate>Activity:Effectivedate</Parameter>
<Parameter NAME= ActGuid>Activity:ActivityGuid</Parameter>
<Parameter NAME= Reverse>Activity:Reverse</Parameter>
</Parameters>
<JSTLMessage>
<MsgGuid>${MESSAGEGUID}</MsgGuid>
<EffectiveDate>[EFFdate]</EffectiveDate>
<ActivityDateTime>${EVENTDATETIME}<ActivityDateTime>
<ActivityGuid>[ActGuid] </ActivityGuid>
<Reverse>${REVERSAL}</Reverse>
</JSTLMessage>
</Template>
</Templates>
<PushNotification EventName='Billing'>
<Tests>
<Test CONDITION=ListBill='True'>
<Template> Header</Template>
<Message ID='BillingMsg1'>
<Parameters>
<Parameter NAME= TransactionName>TransactionName </Parameter>
<Parameter NAME= Segment>Segment</Parameter>
<Parameter NAME= TransactionCount>TransactionCount </Parameter>
<Parameter NAME= Event>Activity:Event</Parameter>
</Parameters>
<JSTLMessage>
<Event>[Event]</Event>
<MSGGUId>${MESSAGEGUID}</MSGGUId>
<!-- A transaction Map with Segment Object Array -->
<forEach items="[transactionMap]" var="eachTransaction">
<Transaction name="[eachTransaction.key]">
<forEach items="[ eachTransaction.value]" var="eachSegment">
<Segment name="[eachSegment.name]">
<BillingTotal>[eachSegment.total]</BillingTotal>
</Segment>
</Transaction>
</forEach>
</JSTLMessage>
</Message>
</Test>
</Tests>
</PushNotification>
<OnTransactionFailure>
<Message>
<Parameters>
<Parameter NAME= EFFdate>Activity:ActivityEffectivedate</Parameter>
<Parameter NAME= PaidToDate>Activity:PaidToDate</Parameter>
<Parameter NAME= Fee>Activity:PolicyFee</Parameter>
</Parameters>
<JSTLMessage>
<MsgGuid>${MESSAGEGUID}</MsgGuid>
<Reversal>${REVERSAL}</Reversal>
<EffectiveDate>[EFFdate]</EffectiveDate>
<ActivityDateTime>[Datetime]<ActivityDateTime>
<DueDate>[PaidToDate] </DueDate>
<PolicyFee>[Fee]</PolicyFee>
</JSTLMessage>
</Message>
</OnTransactionFailure>
<OnPushFailure>
<RollbackTransaction>Yes</RollbackTransaction>
<CreateBusinessError>Yes</CreateBusinessError>
</OnPushFailure>
</PushNotifications>
Output Example
<MsgGuid> 9B5AA155-4F7B-46AC-9A92-A253BE14C6B7</MsgGuid>
<EffectiveDate> 2016-11-01</EffectiveDate>
<ActivityDateTime>2018-07-18T09:32:12.643-05:00 <ActivityDateTime>
<ActivityGuid> AB4016A2-573D-4918-A94D-1F786725B717 </ActivityGuid>
<Event>Billing</Event>
<MsgId>BillingMsg1</MsgId>
<Transaction name="Transaction2">
<Segment name="Segment21">
<BillingTotal>111</BillingTotal>
</Segment>
<Segment name="Segment22">
<BillingTotal>222</BillingTotal>
</Segment>
</Transaction>
<Transaction name="Transaction1">
<Segment name="Segment11">
<BillingTotal>100</BillingTotal>
</Segment>
<Segment name="Segment12">
<BillingTotal>200</BillingTotal>
</Segment>
</Transaction>
Output - OnTransactionFailure
<MsgGuid> 9B5AA155-4F7B-46AC-9A92-A253BE14C6B7</MsgGuid> <EffectiveDate> 2016-11-01</EffectiveDate> <ActivityDateTime>2018-07-18T09:32:12.643-05:00 <ActivityDateTime> <ActivityGuid> AB4016A2-573D-4918-A94D-1F786725B717 </ActivityGuid> <ActivityStatus>Pending</ActivityStatus>
Example of a JSTL Template
<Message>
<Parameters>
<Parameter name=Eventname>Activity: Event </Parameter>
<Parameter name=EffectiveDate> Activity:EffDate </Parameter>
<Parameter name=PolicyNumber> Activity:PolNumber </Parameter>
<Parameter name=PaidToDate> Activity:PaidToDate </Parameter>
<Parameter name=ModalPremium> Activity:ModalPremium </Parameter>
<Parameter name=EFTModalPremium> Activity: EFTModalPremium </Parameter>
<Parameter name=AnnualDiscount> Activity: AnnualDiscount </Parameter>
</Parameters>
<JSTLMessage>
<Event EVENTNAME=[EventName]></Event>
<MsgGUID>${MESSAGEGUID}</MsgGUID>
<EffectiveDate> [EffectiveDate]</EffectiveDate>
<PolicyNumber>[PolicyNumber] </PolicyNumber
<PaidToDate>[PaidToDate] </PaidToDate>
<Premium>
<ModalPremium>[ModalPremium] </ModalPremium>
<EFTModalPremium>[EFTModalPremium] </EFTModalPremium>
<AnnualDiscount>[AnnualDiscount] </AnnualDiscount>
</Premium>
</JSTLMessage>
</Message>
Output
<Message>
<Event EVENTNAME="Billing">
<MsgGUID> 9B5AA155-4F7B-46AC-9A92-A253BE14C6B7</MsgGUID>
<EffectiveDate> 2016-11-01</EffectiveDate>
<PolicyNumber>A000075449 </PolicyNumber>
<PaidToDate>2017-11-01 </PaidToDate>
<Premium>
<ModalPremium>380 </ModalPremium>
<EFTModalPremium>400 </EFTModalPremium>
<AnnualDiscount> 20 </AnnualDiscount>
</Premium>
</Event>
</Message>
Parameter Element
The <Parameter> element in PushNotifications is used to map the MathVariable with JSTL message and has attributes TYPE and DATATYPE. DATATYPE is a required attribute whereas TYPE is optional and is required for complex TYPE's. PushNotifications support the following combination of DATATYPE and TYPE. Math Variable should be defined in transaction for each parameter with its Type and Datatype
|
DATATYPE |
TYPE |
|
BIGTEXT |
FIELD |
|
BOOLEAN |
EXPRESSION |
|
BOOLEAN |
VALUE |
|
CURRENCY |
FIELD |
|
DATE |
ACTIVITYFIELD |
|
DATE |
EXPRESSION |
|
DATE |
FIELD |
|
DATE |
FUNCTION |
|
DATE |
FUNCTIONCALL |
|
DATE |
IIF |
|
DATE |
PLANFIELD |
|
DATE |
POLICYFIELD |
|
DATE |
SQL |
|
DATE |
SYSTEMDATE |
|
DATE |
VALUE |
|
DECIMAL |
EXPRESSION |
|
DECIMAL |
FIELD |
|
DECIMAL |
FUNCTION |
|
DECIMAL |
IIF |
|
DECIMAL |
MULTIFIELD |
|
DECIMAL |
PLANFIELD |
|
DECIMAL |
POLICYFIELD |
|
DECIMAL |
SQL |
|
DECIMAL |
VALUE |
|
FORMATDATE |
DATE |
|
FORMATDATE |
DATE |
|
INTEGER |
FUNCTION |
|
INTEGER |
SQL |
|
INTEGER |
VALUE |
|
INTEGER |
EXPRESSION |
|
TEXT |
EXPRESSION |
|
TEXT |
IIF |
|
TEXT |
POLICYFIELD |
|
TEXT |
SQL |
|
TEXT |
VALUE |
Example for Date format Conversion in a Transaction
Define two math variables in the transaction xml, one to generate time format and the other for date format conversion. The EVENTDATETIME is printed in the same format if configured in PushNotifications.
<MathVariable VARIABLENAME="EventDateTime" TYPE="DATE" DATATYPE="FORMATDATE" OPERATION="GENERATE" TOFORMAT="yyyy-MM-dd 'at' HH:mm:ss z"></MathVariable>
<MathVariable VARIABLENAME="ActivityEffectiveDate" TYPE="DATE" DATATYPE="FORMATDATE" OPERATION="CONVERT" TOFORMAT="yyyy-MM-dd 'at' HH:mm:ss zs">Activity:EffectiveDate</MathVariable>
Date formats that are supported are listed in the table below:
| a | Am/pm marker | Text | PM |
| D | Day in year | Number | 189 |
| d | Day in month | Number | 10 |
| E | Day name in week | Text | Tuesday; Tue |
| F | Day of week in month | Number | 2 |
| H | Hour in day (0-23) | Number | 0 |
| h | Hour in am/pm (1-12) | Number | 12 |
| k | Hour in day (1-24) | Number | 24 |
| K | Hour in am/pm (0-11) | Number | 0 |
| M | Month in year | Month | July; Jul; 07 |
| m | Minute in hour | Number | 30 |
| s | Second in minute | Number | 55 |
| S | Millisecond | Number | 978 |
| u | Day number of week (1 = Monday, ..., 7 = Sunday) | Number | 1 |
| w | Week in year | Number | 27 |
| W | Week in month | Number | 2 |
| X | Time zone | ISO 8601 time zone | -08; -0800; -08:00 |
| y | Year | Year | 1996; 96 |
| Y | Week year | Year | 2009; 09 |
| z | Time zone | General time zone | Pacific Standard Time; PST; GMT-08:00 |
| Z | Time zone | RFC 822 time zone | -0800 |
Pattern letters are usually repeated, as their number determines the exact presentation.
Within date and time pattern strings, unquoted letters from 'A' to 'Z' and from 'a' to 'z' are interpreted as pattern letters representing the components of a date or time string. Text can be quoted using single quotes (') to avoid interpretation. "''" represents a single quote. All other characters are not interpreted; they're simply copied into the output string during formatting or matched against the input string during parsing.
Below are some examples to display how different datatypes and types can be used within Push notifications:
<Transaction> <EffectiveDate STATUS="Enabled" TYPE="SYSTEM"/> <Fields> <Field> <Name>TextArea1</Name> <Display>Text Area 1 Field</Display> <DataType>TextArea</DataType> </Field> <Field> <Name>GraceMoney</Name> <Display>Grace Money Received</Display> <DataType>Money</DataType> <Currency>EUR,JPY,THB,TWD,USD</Currency> <DefaultValue>0</DefaultValue> </Field> <Field> <Name>SomeDate</Name> <Display>some Date</Display> <DataType>Date</DataType> </Field> <Field> <Name>field2</Name> <Display>GraceMoney Comment</Display> <DataType>Text</DataType> </Field> <Field> <Name>Test</Name> <Display>GraceMoney Comment21</Display> <DataType>Text</DataType> </Field> <Field> <Name>PolicyCurrencySupportTest1</Name> <Display>Bug Retest Currency21</Display> <DataType>Money</DataType> <DefaultValue>0</DefaultValue> </Field> <Field> <Name>PaymentMode</Name> <Display>PaymentMode</Display> <DataType>Decimal</DataType> <DefaultValue>1</DefaultValue> </Field> </Fields> <Math> <MathVariables> <MathVariable VARIABLENAME="True" TYPE="VALUE" DATATYPE="TEXT">01</MathVariable> <MathVariable VARIABLENAME="False" TYPE="VALUE" DATATYPE="TEXT">00</MathVariable> <MathVariable VARIABLENAME="ActivityEffectiveDate" TYPE="DATE" DATATYPE="FORMATDATE" OPERATION="CONVERT" TOFORMAT="YYYY-'W'ww-u">Activity:EffectiveDate</MathVariable> <MathVariable VARIABLENAME="EventDateTime" TYPE="DATE" DATATYPE="FORMATDATE" OPERATION="GENERATE" TOFORMAT="YYYY-'W'ww-u"/> <MathVariable VARIABLENAME="RequiredMV" TYPE="FIELD" DATATYPE="DATE">Activity:EffectiveDate</MathVariable> <MathVariable VARIABLENAME="ActivityEffDate" TYPE="FIELD" DATATYPE="DATE">Activity:EffectiveDate</MathVariable> <MathVariable VARIABLENAME="PaidToDate" TYPE="FIELD" DATATYPE="DATE">Activity:EffectiveDate</MathVariable> <MathVariable VARIABLENAME="DaysToMaturity" TYPE="FUNCTION" DATATYPE="Decimal">DaysDiffOf(RequiredMV, ActivityEffDate)</MathVariable> <MathVariable VARIABLENAME="BigTextMV1" TYPE="FIELD" DATATYPE="BIGTEXT">Activity:TextArea1</MathVariable> <MathVariable VARIABLENAME="PolicyCurrency" TYPE="FIELD" DATATYPE="CURRENCY">Activity:GraceMoney</MathVariable> <MathVariable VARIABLENAME="payerName" TYPE="VALUE" DATATYPE="TEXT">Chris Snow</MathVariable> <MathVariable VARIABLENAME="isReBill" TYPE="VALUE" DATATYPE="BOOLEAN">false</MathVariable> </MathVariables> </Math> </Transaction>
<PushNotifications> <PushNotification EVENTNAME="Billing"> <Message ID="BillingMsg1"> <Tests> <Test>1=1</Test> <Test>1=1</Test> </Tests> <AsEventMessage xmlns="http://xmlns.examplealarmere.com/PAS/AsEventMessage"> <JSTLMessage> <Parameters> <Parameter DATATYPE="TEXT" NAME="payerName">payerName</Parameter> <Parameter DATATYPE="BOOLEAN" NAME="isReBill">isReBill</Parameter> <Parameter DATATYPE="BIGTEXT" NAME="BigTextMV1">BigTextMV1</Parameter> <Parameter DATATYPE="Date" NAME="EFFdate">Activity:EffectiveDate</Parameter> <Parameter DATATYPE="Decimal" NAME="DM">DaysToMaturity</Parameter> <Parameter DATATYPE="CURRENCY" NAME="PolicyCurrency">PolicyCurrency</Parameter> <Parameter DATATYPE="FORMATDATE" NAME="EVENTDATETIME">EventDateTime</Parameter> <Parameter DATATYPE="FORMATDATE" NAME="ActivityEffectiveDate">ActivityEffectiveDate</Parameter> <Parameter DATATYPE="Text" NAME="ActivityGUID">Activity:ActivityGUID</Parameter> </Parameters> <Billing> <Reversal>[REVERSAL]</Reversal> <BigTextMV1>[BigTextMV1]</BigTextMV1> <payerName>[payerName]</payerName> <isReBill>[isReBill]</isReBill> <EffectiveDate>[EFFdate]</EffectiveDate> <DaysToMaturity>[DM]</DaysToMaturity> <PolicyCurrency>[PolicyCurrency]</PolicyCurrency> <ActivityGUID>[ActivityGUID]</ActivityGUID> <ActivityEffectiveDate>[ActivityEffectiveDate]</ActivityEffectiveDate> <EventDateTime>[EVENTDATETIME]</EventDateTime> </Billing> </JSTLMessage> </AsEventMessage> </Message> </PushNotification> <OnPushFailure> <RollbackTransaction>Yes</RollbackTransaction> <CreateBusinessError>Yes</CreateBusinessError> </OnPushFailure> </PushNotifications>
Output Message:
"<AsEventMessage xmlns="http://xmlns.exampleabc.com/PAS/AsEventMessage"> <Billing> <Reversal>false</Reversal> <BigTextMV1>MyTest</BigTextMV1> <payerName>Chris Snow</payerName> <isReBill>false</isReBill> <EffectiveDate>Fri Dec 01 00:00:00 GMT 2023</EffectiveDate> <DaysToMaturity>0.0</DaysToMaturity> <PolicyCurrency>710.0USD</PolicyCurrency> <ActivityGUID>21F29127-EF75-4167-8DB5-3B90E1978A37</ActivityGUID> <ActivityEffectiveDate>2023-W48-2023</ActivityEffectiveDate> <EventDateTime>2024-W20-2024</EventDateTime> </Billing> </AsEventMessage>"
Some more examples with different Types and Datatype combinations below.
MathVariables:
<MathVariable VARIABLENAME="DECIMALFIELD" TYPE="FIELD" DATATYPE="DECIMAL">Activity:PaymentAmount</MathVariable>
<MathVariable VARIABLENAME="DECIMALExpression" TYPE="EXPRESSION" DATATYPE="DECIMAL">DECIMALFIELD*2</MathVariable>
<MathVariable VARIABLENAME="INT" TYPE="VALUE" DATATYPE="INTEGER">30</MathVariable>
<MathVariable VARIABLENAME="DECIMALVALUE" TYPE="VALUE" DATATYPE="DECIMAL">1.1</MathVariable>
<MathVariable VARIABLENAME="A" TYPE="FIELD" DATATYPE="DATE">Activity:SomeDate</MathVariable>
<MathVariable VARIABLENAME="B" TYPE="FIELD" DATATYPE="DATE">Activity:EffectiveDate</MathVariable>
<MathVariable VARIABLENAME="DaysToMaturity" TYPE="FUNCTION" DATATYPE="DECIMAL">DaysDiffOf(A, B)</MathVariable>
Parameter definition:
<Parameter DATATYPE="DECIMAL" NAME="DECIMALFIELD">DECIMALFIELD</Parameter>
<Parameter DATATYPE="INTEGER" NAME="INT">INT</Parameter>
<Parameter DATATYPE="DECIMAL" NAME="DECIMALVALUE">DECIMALVALUE</Parameter>
<Parameter DATATYPE="DECIMAL" NAME="DECIMALExpression">DECIMALExpression</Parameter>
<Parameter DATATYPE="TEXT" NAME="True">True</Parameter>
<Parameter DATATYPE="DECIMAL" NAME="DaysToMaturity">DaysToMaturity</Parameter>
<Parameter DATATYPE="DECIMAL" NAME="DaysToMaturity">DaysToMaturity</Parameter>
<Parameter DATATYPE="DATE" NAME="VarA">Activity:SomeDate</Parameter>
<Parameter DATATYPE="DATE" NAME="VarB">B</Parameter>
JSTL Message:
<DECIMALFIELD>[DECIMALFIELD]</DECIMALFIELD>
<INT>[INT]</INT>
<True>[True]</True>
<DECIMALExpression>[DECIMALExpression]</DECIMALExpression>
<DECIMALVALUE>[DECIMALVALUE]</DECIMALVALUE>
<DaysToMaturity>[DaysToMaturity]</DaysToMaturity>
<Field1>[VarA]</Field1>
<Field2>[VarB]</Field2>
Error messages for Downstream message push:
Error messages:
-
If the EVENT value in PushNotifications does not match with any EVENT NAME value in DownstreamMessagePushDefinition the below error gets displayed.
Unable to send message to the outbound server: EVENT in PushNotifications is not found in downstreammessagepushdefinition:EVENT/MSGID
-
If messages from multiple events in the PushNotifications fails due to ENV value mismatch between pas properties and DownstreamMessagePushDefinition, multiple errors one for each EVENT will get displayed.
-
If ENV value in pas properties does not match with ENV value in DownstreamMessagePushDefinition then the below message gets displayed.
Unable to send message to the outbound server: ENV value mismatch between pas properties and DownstreamMessagePushDefinition: EVENT
-
If messages from multiple events in the PushNotifications fails due to ENV value mismatch between pas properties and DownstreamMessagePushDefinition, multiple errors one for each EVENT will get displayed.